Crate tls_parser [−] [src]
TLS Parser
A TLS parser, implemented with the nom parser combinator framework.
The goal of this parser is to implement TLS messages analysis, for example to use rules from a network IDS, for ex during the TLS handshake.
It implements structures and parsing functions for records and messages, but need additional code to handle fragmentation, or to fully inspect messages. Parsing some TLS messages requires to know the previously selected parameters. See the rusticata TLS parser for a full example.
The code is available on Github and is part of the Rusticata project.
Implementation notes
When parsing messages, if a field is an integer corresponding to an enum of known values, it is not parsed as an enum type, but as an integer. While this complicates accesses, it allows to read invalid values and continue parsing (for an IDS, it's better to read values than to get a generic parse error).
Reexports
pub use tls_alert::*; |
pub use tls_ciphers::*; |
pub use tls_dh::*; |
pub use tls_ec::*; |
pub use tls_extensions::*; |
pub use tls_sign_hash::*; |
pub use tls_states::*; |
pub use tls::*; |
pub use tls_serialize::*; |
Modules
tls |
TLS parser structures and functions |
tls_alert |
TLS alerts |
tls_ciphers |
TLS ciphersuites definitions and parameters |
tls_dh |
Diffie-Hellman parameters |
tls_ec |
Elliptic curves |
tls_extensions |
TLS extensions |
tls_sign_hash |
TLS signature schemes |
tls_states |
TLS state machine |